# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Rohan Dhruva (rohandhruva at gmail dot com)

pkgname=python-docs
pkgver=3.11.3
pkgrel=1
pkgdesc="Set of HTML documentation for python"
arch=('any')
url="https://docs.python.org/py3k/"
license=('GPL')
options=('docs')
source=(https://sources.archlinux.org/other/community/python-docs/python-$pkgver-docs-html.tar.bz2)
sha256sums=('8af1ff8163810b328a0f9ce0e88fc430b0fe6a54a99dfd3265dded3bf547ccb9')

package() {
  mkdir -p "$pkgdir"/usr/share/doc/python/html
  cp -rf "$srcdir"/python-$pkgver-docs-html/* "$pkgdir"/usr/share/doc/python/html/
  find "$pkgdir"/usr/share/doc/python/html/ -type f -exec chmod 0644 {} \;
  find "$pkgdir"/usr/share/doc/python/html/ -type d -exec chmod 0755 {} \;
  install -dm0755 "$pkgdir"/etc/profile.d
  echo "export PYTHONDOCS=/usr/share/doc/python/html/library" >"$pkgdir"/etc/profile.d/$pkgname.sh
  echo "setenv PYTHONDOCS /usr/share/doc/python/html/library" >"$pkgdir"/etc/profile.d/$pkgname.csh
}
